//
//  AnotherCollectionViewCell.m
//  MMLOOK
//
//  Created by dllo on 15/9/5.
//  Copyright (c) 2015年 武俊娥. All rights reserved.
//

#import "AnotherCollectionViewCell.h"
#import "UIImageView+WebCache.h"

@interface AnotherCollectionViewCell ()

@property (nonatomic, retain)UIImageView *aimageView;
@property (nonatomic, retain)UILabel *lable;

@end

@implementation AnotherCollectionViewCell

- (void)dealloc
{
    [_aimageView release];
    [_lable release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatSubView];
    }
    return self;
}

- (void)creatSubView
{
    self.aimageView = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height - 50)] autorelease];
    [self addSubview:self.aimageView];
    
    self.lable = [[[UILabel alloc] initWithFrame:CGRectMake(0, self.aimageView.frame.size.height + _aimageView.frame.origin.y, self.frame.size.width, 50)] autorelease];
    self.lable.font = [UIFont systemFontOfSize:15 * OffHeight];
    self.lable.numberOfLines= 0;
    [self addSubview:self.lable];
}

- (void)sendDic: (NSMutableDictionary *)dic
{
    [self.aimageView sd_setImageWithURL:[NSURL URLWithString:[dic objectForKey:@"pic"]] placeholderImage:[UIImage imageNamed:@"home.jpg"]];
    self.lable.text = [dic objectForKey:@"detail"];
}

@end
